<%--
  Created by IntelliJ IDEA.
  User: 临渊羡鱼
  Date: 2020/8/17
  Time: 21:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>菜鸟互啄后台管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <!-- load css -->
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/common/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/common/global.css" media="all">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/css/adminstyle.css" media="all">


</head>
<body>
<div class="layui-layout layui-layout-admin" id="layui_layout">
    <!-- 顶部区域 -->
    <div class="layui-header header header-demo">
        <div class="layui-main">
            <!-- logo区域 -->
            <div class="admin-logo-box">
                <a class="logo" href="http://www.kuxuebao.net" title="logo">菜鸟互啄后台</a>
                <div class="larry-side-menu">
                    <i class="fa fa-bars" aria-hidden="true"></i>
                </div>
            </div>
            <!-- 顶级菜单区域 -->
            <div class="layui-larry-menu">
                <ul class="layui-nav clearfix">
                    <li class="layui-nav-item">   <%--layui-this--%>
                        <a href="javascirpt:;"><i class="iconfont icon-wangzhanguanli"></i>内容管理</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascirpt:;"><i class="iconfont icon-weixin3"></i>微信公众</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascirpt:;"><i class="iconfont icon-ht_expand"></i>扩展模块</a>
                    </li>
                </ul>
            </div>
            <!-- 右侧导航 -->
            <ul class="layui-nav larry-header-item">
                <li class="layui-nav-item" style="margin-right: 10px;">
<%--                    <c:if test="${sessionScope.admin.adminImg ==null}">--%>
                        <img  src="${pageContext.request.contextPath }/style/image/head1.jpg" class="img-circle" width="40" style="border-radius: 10px;"/>
<%--                    </c:if>--%>
                    <!-- 自定义头像 -->
                  <%--  <c:if test="${sessionScope.admin.adminImg !=null}">
                        <img  src="${pageContext.request.contextPath }/AdminController/getAdminImg?fileName=${sessionScope.admin.adminImg}"  class="img-circle" width="80" />
                    </c:if>--%>

                </li>
                <li class="layui-nav-item">
                    管理员：${sessionScope.admin.adminName}
                </li>
                <li class="layui-nav-item first">
                    <a href="javascript:;">
                        <cite>设置</cite>
                        <span class="layui-nav-more"></span>
                    </a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="${pageContext.request.contextPath}/AdminController/getQueryByName?name=${sessionScope.admin.adminName}" target="current">修改头像</a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="${pageContext.request.contextPath}/AdminController/exitLogin">
                        <i class="iconfont icon-exit"></i>
                        退出</a>
                </li>
            </ul>
        </div>
    </div>
    <!-- 左侧侧边导航开始 -->
    <div class="layui-side layui-side-bg layui-larry-side" id="larry-side">
        <div class="layui-side-scroll" id="larry-nav-side" lay-filter="side">

            <!-- 左侧菜单 -->
            <ul class="layui-nav layui-nav-tree">
                <li class="layui-nav-item">
                    <a href="main.jsp" target="current">
                        <i class="iconfont icon-home1" data-icon='icon-home1'></i>
                        <span>后台首页</span>
                    </a>
                </li>
                <!-- 个人信息 -->
                <li class="layui-nav-item layui-this">
                    <a href="${pageContext.request.contextPath}/back/table.jsp" target="current">
                        <i class="iconfont icon-jiaoseguanli" ></i>
                        <span>管理员</span>
                        <em class="layui-nav-more"></em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd>
                       <a href="${pageContext.request.contextPath}/back/table.jsp" target="current">  <%--adminInfo.jsp--%>
                                <i class="iconfont icon-geren1" data-icon='icon-geren1' ta></i>
                                <span>管理员信息</span>
                            </a>
                        </dd>

                    </dl>
                </li>
                <!-- 用户管理 -->
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="iconfont icon-jiaoseguanli2" ></i>
                        <span>用户管理</span>
                        <em class="layui-nav-more"></em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="${pageContext.request.contextPath}/back/showUsers.jsp" target="current">
                                <i class="iconfont icon-yonghu1" data-icon='icon-yonghu1'></i>
                                <span>用户列表</span>
                            </a>
                        </dd>

                        <dd>
                            <a href="${pageContext.request.contextPath}/back/showNews.jsp" target="current">
                                <i class="iconfont icon-quanxian2" data-icon='icon-quanxian2'></i>
                                <span>动态管理</span>
                            </a>
                        </dd>
                    </dl>
                </li>
                <!-- 内容管理 -->
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="iconfont icon-wenzhang1" ></i>
                        <span>旅游管理</span>
                        <em class="layui-nav-more"></em>
                    </a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="${pageContext.request.contextPath}/showSightDetail.jsp" target="current">
                                <i class="iconfont icon-wenzhang2" data-icon='icon-wenzhang2'></i>
                                <span>景点列表</span>
                            </a>
                        </dd>
                        <dd>
                            <a href="${pageContext.request.contextPath}/addSightDetail.jsp" target="current">
                                <i class="iconfont icon-icon1" data-icon='icon-icon1'></i>
                                <span>添加景点</span>
                            </a>
                        </dd>

                    </dl>
                </li>

            </ul>
        </div>
    </div>

    <!-- 左侧侧边导航结束 -->
    <!-- 右侧主体内容 -->
    <div class="layui-body" id="larry-body" style="bottom: 0;border-left: solid 2px #2299ee;">
        <div class="layui-tab layui-tab-card larry-tab-box" id="larry-tab" lay-filter="demo" lay-allowclose="true">
            <div class="go-left key-press pressKey" id="titleLeft" title="滚动至最右侧"><i class="larry-icon larry-weibiaoti6-copy"></i> </div>
            <ul class="layui-tab-title">
                <li class="layui-this" id="admin-home" style="margin-left: 0.5px;">
                    <i class="iconfont icon-diannao1"></i>
                    <em>后台首页</em>
                </li>
            </ul>
            <div class="go-right key-press pressKey" id="titleRight" title="滚动至最左侧"><i class="larry-icon larry-right"></i></div>
            <ul class="layui-nav closeBox">
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="iconfont icon-caozuo"></i> 页面操作</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" class="refresh refreshThis"><i class="layui-icon">&#x1002;</i> 刷新当前</a></dd>
                        <dd><a href="javascript:;" class="closePageOther"><i class="iconfont icon-prohibit"></i> 关闭其他</a></dd>
                        <dd><a href="javascript:;" class="closePageAll"><i class="iconfont icon-guanbi"></i> 关闭全部</a></dd>
                    </dl>
                </li>
            </ul>
            <div class="layui-tab-content" style="min-height: 150px; ">
                <div class="layui-tab-item layui-show">
                    <iframe class="larry-iframe" data-id='0' src="${pageContext.request.contextPath}/back/table.jsp" name="current" style="height: 636px;"></iframe>
                </div>
            </div>
        </div>
    </div>
    <!-- 底部区域 -->
    <div class="layui-footer layui-larry-foot" id="larry-footer">
        <div class="layui-mian">
            <p class="p-admin">
                <span>2017 &copy;</span>
                广州普金计算机科技股份有限公司,版权所有
            </p>
        </div>
    </div>
</div>
<!-- 加载js文件-->
<script type="text/javascript" src="${pageContext.request.contextPath}/style/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/style/common/layui/layui.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/style/js/larry.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/style/js/index.js"></script>
<!-- 锁屏 -->
<div class="lock-screen" style="display: none;">
    <div id="locker" class="lock-wrapper">
        <div id="time"></div>
        <div class="lock-box center">
            <img src="${pageContext.request.contextPath}/style/images/userimg.jpg" alt="">
            <h1>admin</h1>
            <duv class="form-group col-lg-12">
                <input type="password" placeholder='锁屏状态，请输入密码解锁' id="lock_password" class="form-control lock-input" autofocus name="lock_password">
                <button id="unlock" class="btn btn-lock">解锁</button>
            </duv>
        </div>
    </div>
</div>

</body>
<script>
    $.ajaxSetup({
        complete: function (xhr, status) {
            //拦截器实现超时跳转到登录页面
            // 通过xhr取得响应头
            var REDIRECT = xhr.getResponseHeader("REDIRECT");
            //如果响应头中包含 REDIRECT 则说明是拦截器返回的
            if (REDIRECT == "REDIRECT") {
                var win = window;
                while (win != win.top) {
                    win = win.top;
                }
                //重新跳转到 login.html
                win.location.href = xhr.getResponseHeader("CONTENTPATH");
            }
        }
    });
</script>
</html>
